package com.example.demopoi.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class TestService {

    @Async
    public void executeAsync1(Integer i) {
        System.out.println("执行异步任务：" + i + ";" + Thread.currentThread().getName());
    }

    @Async
    public void executeAsync2(Integer i) {
        System.out.println("执行异步任务2：" + i + ";" + Thread.currentThread().getName());
    }

}
